package com.mapper;

import com.mybatisflex.core.BaseMapper;
import com.entity.Login;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * 登录 映射层。
 *
 * @author admin
 * @since 2024-06-17
 */
@Mapper
public interface LoginMapper extends BaseMapper<Login> {
        @Select("SELECT * FROM login WHERE username =#{username} and pwd=#{pwd}")
    public Login userLogin(Login login);

    @Insert("INSERT INTO login(username,pwd)" +
            "values (#{username},#{pwd})")
    public int insertUser(Login login);
}
